<template>
  <header class="head">
    <!-- 列表内容 -->
    <div class="main">
      <div class="main_head">
        <!-- 地址信息 -->
        <div class="details">
          <img :src="address.avatar" alt="">
        </div>
        <!-- 名称 -->
        <div class="male">
          <p><span><img src="" alt=""></span><span>{{address.name}}</span></p>
          <p>{{address.description}}</p>
          <p>在线支付满<span>{{address.minPrice}}</span>减<span>{{address.deliveryPrice}}</span></p>
        </div>
      </div>
      <!-- 公告 -->
      <div class="gonggao">
        {{address.bulletin}}
      </div>
    </div>
  </header>
</template>

<script>
// 导入底部导航栏组件eslint的写法的  
export default {
  // name: 'index',
  data () {
    return {
      address : {},
      lists : []
    }
  },
  created () {
    this.get_address()
  },
  methods : {
    // 位置信息
    get_address() {
      // this没有指向，，需要将this储存起来。。。修改轮播图的数据源数组
      let _this = this
      // console.log(this)
      _this.$http.get('/seller')
      .then(function (res) {
        if(res.data.code == 0){
          _this.address = res.data.data
        }
      })
      .catch(function (error) {
        console.log(error)
      })
    }
  }
}
</script>

<style scoped>
  @import "../../style/common.scss";
  .main_head{
    display: flex;
    width: 100%;
    background-color: rgba(7, 17, 27, 0.5)
  }
  .details{
    flex: 1;
    max-width: 64px;
    border-radius: 4px;
    margin: 24px 0 18px 24px;
  }
  .details img{
    width: 64px;
    height: 64px;
    border-radius: 4px;
  }
  .details_img{
    width: 64px;
  }
  .male{
    flex: 2;
    height: 64px;
    margin: 24px 0 18px 24px;
    text-align: left;
    font-size: 16px;
    color: rgb(255, 255, 255);
    font-weight: bold;
    line-height: 18px;
  }
  .male p:first-child{
    font-size: 16px;
    color: rgba(255, 255, 255);
    font-weight: bold;
    line-height: 18px;
  }
  .male p:nth-child(2){
    font-size: 12px;
    color: rgba(255, 255, 255);
    font-weight: 200;
    line-height: 12px;
    margin-top: 8px;
  }
  .male p:nth-child(3){
    font-size: 10px;
    color: rgba(255, 255, 255);
    font-weight: 200;
    line-height: 12px;
    margin-top: 10px;
  }
  .gonggao{
    width: 100%;
    height: 28px;
    background-color: rgba(7, 17, 27,0.2);
    line-height: 28px;
    text-align: left;
    overflow: hidden;
    text-overflow:ellipsis;
    white-space: nowrap;
    padding: 0 12px;
  }
</style>
